package com.papercut.purchase;

import java.util.List;

public class PurchaseEntity {
	public final String merchant;
	public final List<PurchaseItem> items;
	public final float shippingCost;
	public final String tax;
	public final int date;

	public PurchaseEntity(String merchant, List<PurchaseItem> items,
			float shippingCost, String tax, int date) {
		this.merchant = merchant;
		this.items = items;
		this.shippingCost = shippingCost;
		this.tax = tax;
		this.date = date;
	}

	public String getMerchant() {
		return this.merchant;
	}

	public List<PurchaseItem> getItems() {
		return this.items;
	}
	public int getDate(){
		return this.date;
	}
	public float getShippingCost(){
		
		return this.getShippingCost();
		
	}
	
	public float getTotalCost(){
		float cost = 0;
		for(int i = 0; i < this.items.size(); i++){
			cost += this.items.get(i).getPrice();
		}
		return cost;
	}

}
